﻿#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
import string

def enum(**enums):
    return type('Enum', (), enums)

def only_numbers(string):
    """ Rip all numbers from string. """
    return re.sub("[^0123456789\.,]", "", string)

def convert_date(previous_date):
    splitted = previous_date.split("T")
    ret_val = ""
    for element in splitted[1].split(":")[0:2]:
        ret_val += element + ":"
    ret_val = ret_val[:-1:]
    return ret_val + " " + splitted[0]
